
<!DOCTYPE html>
<html lang="zh-cn">
<head><meta name="generator" content="Hexo 3.8.0">
    <title>构建工具 - Admui 开发文档</title>
    <meta charset="utf-8">
    <meta name="keywords" content="admui,admui官网,admui框架,通用后台管理系统,后台框架,ui框架">
    <meta name="description" content="Admui 是一个基于最新 Web 技术的企业级通用管理系统快速开发框架，可以帮助企业极大的提高工作效率，节省开发成本，提升品牌形象">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
    <!--[if lte IE 9]>
    <meta http-equiv="refresh" content="0; url='http://www.admui.com/ie'" />
    <![endif]-->
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Admui">
    <meta name="msapplication-TileImage" content="http://cdn.admui.com/site/img/app/icon-72@x2.png">
    <meta name="msapplication-TileColor" content="#395b81">
    <link rel="apple-touch-icon-precomposed" href="http://cdn.admui.com/site/img/app/icon-72@x2.png">
    <link rel="shortcut icon" href="http://cdn.admui.com/site/img/app/favicon.png">
    <meta name="msapplication-TileColor" content="#62a8ea">
    <script>
        window.PAGE_TYPE = "ui"
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?cd758c4c82a4964836712308cb782b12";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <link rel="stylesheet" href="http://cdn.admui.com/docs/v1/css/page.css">
</head>
<body>
<div id="mobile-bar">
    <a class="menu-button"></a>
    <a class="logo" href="../../index.html">Admui开发文档</a>
    <select class="version-select">
        <option value="basic" selected>基础版</option>
        <option value="pjax">pjax版</option>
        <option value="iframe">iframe版</option>
    </select>
</div>
<div id="header">
    <a id="logo" href="../../index.html">
        <img src="http://cdn.admui.com/docs/common/images/logo.svg"> <span>Admui 开发文档</span>
    </a>
    <select class="version-select">
        <option value="basic/1.x" selected>基础版</option>
        <option value="pjax/1.x">pjax版</option>
        <option value="iframe/1.x">iframe版</option>
    </select>
    <ul id="nav">
        <li>
    <a href="../index.html" class="nav-link">首页</a>
</li>
<li>
    <a href="../guide/index.html" class="nav-link">介绍</a>
</li>
<li>
    <a href="index.html" class="nav-link current">UI</a>
</li>
<li>
    <a href="../java/index.html" class="nav-link">JAVA</a>
</li>
<li>
    <a href="../logs/index.html" class="nav-link">更新日志</a>
</li>
<li>
    <a href="../../index.html" class="nav-link">v2版本</a>
</li>

    </ul>
</div>

<div id="main" class="fix-sidebar">
    
    
<div class="sidebar">
    <ul class="main-menu">
        <li>
    <a href="../index.html" class="nav-link">首页</a>
</li>
<li>
    <a href="../guide/index.html" class="nav-link">介绍</a>
</li>
<li>
    <a href="index.html" class="nav-link current">UI</a>
</li>
<li>
    <a href="../java/index.html" class="nav-link">JAVA</a>
</li>
<li>
    <a href="../logs/index.html" class="nav-link">更新日志</a>
</li>
<li>
    <a href="../../index.html" class="nav-link">v2版本</a>
</li>

    </ul>
    <div class="list">
        <ul class="menu-root">
            
            <li>
                <a href="index.html" class="sidebar-link ">基本概述</a>
            </li>
            
            <li>
                <a href="themes.html" class="sidebar-link ">主题说明</a>
            </li>
            
            <li>
                <a href="build.html" class="sidebar-link current ">构建工具</a>
            </li>
            
            <li>
                <a href="files.html" class="sidebar-link ">入口文件</a>
            </li>
            
            <li>
                <a href="structure.html" class="sidebar-link ">模板结构</a>
            </li>
            
            <li>
                <a href="hello-world.html" class="sidebar-link ">Hello world</a>
            </li>
            
            <li>
                <a href="style.html" class="sidebar-link ">自定义样式</a>
            </li>
            
            <li>
                <a href="javascript.html" class="sidebar-link ">JS 模块</a>
            </li>
            
            <li>
                <a href="components.html" class="sidebar-link ">UI 组件</a>
            </li>
            
            <li>
                <a href="plugins.html" class="sidebar-link ">第三方插件</a>
            </li>
            
            <li>
                <a href="icons.html" class="sidebar-link ">字体图标</a>
            </li>
            
            <li>
                <a href="code-guide.html" class="sidebar-link ">编码规范</a>
            </li>
            
        </ul>
    </div>
</div>


<div class="content ui with-sidebar">
    <h1>构建工具</h1>
    <p>您可以通过以下命令来构建 Admui 项目，如果您购买的是基础源码，请略过此步骤。</p>
<h2 id="运行项目"><a href="#%E8%BF%90%E8%A1%8C%E9%A1%B9%E7%9B%AE" class="headerlink" title="运行项目"></a>运行项目</h2><h3 id="安装-NPM-模块"><a href="#%E5%AE%89%E8%A3%85-NPM-%E6%A8%A1%E5%9D%97" class="headerlink" title="安装 NPM 模块"></a>安装 NPM 模块</h3><ul>
<li><p>在根目录下运行<code>npm install</code>安装依赖包。</p>
</li>
<li><p>运行<code>npm run dev</code> 或者 <code>npm run build</code>来启动项目。</p>
</li>
</ul>
<p><code>dev</code> 运行开发环境，提供浏览器自动刷新、增量编译、未压缩静态文件等；<code>build</code> 部署生产环境，合并压缩、替换路径、添加版本号等。</p>
<h3 id="使用-Gulp"><a href="#%E4%BD%BF%E7%94%A8-Gulp" class="headerlink" title="使用 Gulp"></a>使用 Gulp</h3><p>Admui 使用 Gulp 来构建项目。它是自动化项目的构建利器，使用它可以大大提高工作效率。</p>
<p>Admui 配置了大多数常用的任务以构建项目。如果不能满足您的需求，您可以在<code>gulp</code>文件夹下定义更多的任务。</p>
<p>了解如何定义 Gulp 任务，请访问 <a href="http://gulpjs.com/" target="_blank" rel="noopener">Gulp官网</a> 或 <a href="http://www.gulpjs.com.cn/" target="_blank" rel="noopener">Gulp中文网</a>。</p>

    
    <div class="page-links">
        
        <span><a href="themes.html">&lang; 上一页：主题说明</a></span>
        
        
    </div>
    
    <div class="footer">
    &copy; 2015-2017
    <a href="http://www.admui.com/">Admui</a>
    ·
    上海畅控
</div>
</div>

    
</div>


<script src="https://cdn.staticfile.org/smooth-scroll/14.2.1/smooth-scroll.min.js"></script>
<script src="http://cdn.admui.com/docs/common/js/common.js"></script>

<script src="https://cdn.staticfile.org/fastclick/1.0.6/fastclick.min.js"></script>
<script>
    document.addEventListener('DOMContentLoaded', function () {
        FastClick.attach(document.body);
    }, false);
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

</body>
</html>
